package com.bosssoft.hr.train.dbms.example.dao.impl;

import com.bosssoft.hr.train.dbms.example.dao.UserDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jdbc.core.support.JdbcDaoSupport;


@Slf4j
public class UserDaoImpl extends JdbcDaoSupport implements UserDao {

    @Override
    public void addUserRole(int userNum, int roleNum) {
        String sql = String.format("call proc_init_sysdata(%s,%s)",userNum,roleNum);
        log.info(sql);
        this.getJdbcTemplate().execute(sql);
        log.info("done");
    }

}